<?php
namespace Seller\Model;
use Think\Model\ViewModel;

class AgentViewModel extends ViewModel
{
    public $viewFields = array(

        'agent' => array(
            'agent_id','agent_name' ,'mobile' ,'is_agent',
            'invitation_code','all_achi','deposit','u_status',
            'parent_id', 'credit_line','money','is_agent','shop_id',
            '_type' => 'LEFT'
        ),
        'agent_info' => array(
            'username', 'sex','openid','avatar','reg_time','reg_ip','email',
            '_on' => 'agent.agent_id = agent_info.agent_id' ,
            '_type' => 'LEFT'
        ),
//        'agent_rank' => array(
//            'rank_name', 'rank_grade',
//            '_on' => 'agent_rank.rank_id = agent.rank_id' ,
//            '_type' => 'LEFT'
//        ),
    );
}